/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package circuit1;

/**
 *
 * @author Erik
 */
public class Pin implements IElement{
    //private Wire wire;
    private Wire input;
    private Wire output;
    //private Wire out;
    private String ID;
    
    /*public void configPins(){
        out = in;
    }*/
    
    public void setInput(Wire w){
        input = w;
    }
    
    public void setOutput(Wire w){
        output = w;
    }
    
    /*public void setInput(Wire w){
        wire = w;
    }*/
    
    public void setId(String str){
        ID = str;
    }
    
    public String getId(){
        return ID;
    }
    
    public void show(){
        
    }
    
    public boolean act() {
        return true;
    }
    
    public Wire getOutput(){
        return output;
    }
    
    public void prod() {
        //System.out.println("prod eleje");
        //System.out.println("input: " + input.getId());
        //System.out.println("output: " + output.getId());
            ////System.out.println("null");
        output.setValue(input.getValue());
        //System.out.println("input: " + input.getValue());
        //System.out.println("output: " + output.getValue());
        //System.out.println("prod vege");
    }
    
    public boolean getOut(){
        return output.getValue();
    }
}
